##### My (demuredemeanor) bashrc sub source alias script
# Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
# https://notabug.org/demure/dotfiles/
# legacy repo http://github.com/demure/dotfiles
# vim:set syntax=sh:

### Universal Aliases ### {{{
## grep alias
# added due to death of GREP_OPTIONS
alias grep='grep --color=auto --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn'
## Remove OS X 'junk' files
alias rmds='find . -name ".DS_Store" -depth -exec rm -i {} \;'
## Show ls -R with readable depth
alias filetree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
## not sure this is still needed, but might $DISPLAY
alias reset_display='export DISPLAY=$(tmux showenv|grep ^DISPLAY|cut -d = -f 2)'
## Make ed more usable, command mode is now ':' like vi
alias ed='ed -p:'
## Good for sending dirs from server to remote server
alias rsy='rsync -avrSPXRh'
## Preserve user conf while sudoing vim
alias svi='sudo -E vim'
## Delete duplicate lines from file name augment
alias deldup="awk '!x[$0]++' "

	### qmv ### {{{
	if [[ $(command -v qmv) ]]; then
		## Makes qmv more usable, and regex-able
		alias qm='qmv --format=destination-only'
	fi
	### End qmv ### }}}

	### pinfo ### {{{
	if [[ $(command -v pinfo) ]]; then
		## Use color pinfo instead of info
		alias info='pinfo'
	fi
	### End pinfo ### }}}

	### Git Aliases ### {{{
	alias git_force_reset='git fetch --all && git reset --hard origin/master'
	### End Git Aliases ### }}}

	### Docker ### {{{
	if [[ $(command -v docker) ]]; then
		## find last docker container
		alias dl='docker ps -l -q'
	fi
	### End Docker ### }}}
### End Universal Aliases ### }}}
